package mws.task;

public class SwiftTask implements Runnable{

    private final Runnable runnable;

    private volatile boolean quickPass ;

    public SwiftTask(Runnable runnable){
        this(runnable,true);
    }

    public SwiftTask(Runnable runnable , boolean quickPass){
        this.runnable = runnable;
        this.quickPass = quickPass;
    }

    @Override
    public void run() {
        if(quickPass)
            return;
        runnable.run();
    }
}
